package com.fr.cell;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Window;

public class GUIUtils
{
  public static void centerWindow(Window paramWindow)
  {
    Dimension localDimension1 = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension localDimension2 = paramWindow.getSize();
    if (localDimension2.height > localDimension1.height)
      localDimension2.height = localDimension1.height;
    if (localDimension2.width > localDimension1.width)
      localDimension2.width = localDimension1.width;
    paramWindow.setLocation((localDimension1.width - localDimension2.width) / 2, (localDimension1.height - localDimension2.height) / 2 - 20);
  }
}